package com.example.javafx.simple;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Separator;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class SeparatorExample extends Application {

    @Override
    public void start(Stage primaryStage) {
        // 创建多个 Separator
        Separator horizontalSeparator = new Separator();
        Separator verticalSeparator = new Separator();
        verticalSeparator.setOrientation(javafx.geometry.Orientation.VERTICAL);

        // 创建布局并添加 Separator
        VBox root = new VBox();
        root.getChildren().addAll(
            new Separator(),
            new javafx.scene.control.Label("Above Separator"),
            horizontalSeparator,
            new javafx.scene.control.Label("Below Separator"),
            verticalSeparator,
            new javafx.scene.control.Label("To the Right of Vertical Separator")
        );
        Scene scene = new Scene(root, 400, 200);

        primaryStage.setTitle("Separator Example");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}